<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org"
xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="description" content="" />
    <meta name="author" content="" />
    <title>Member Login</title>
    <style>
  		.error_msg{color: red}
	</style>
    <!-- Bootstrap Core CSS -->
    <link href="../../../css/bootstrap.min.css" rel="stylesheet" th:href="@{/css/bootstrap.min.css}" />
    <!-- Custom CSS -->
    <link href="../../../css/grayscale.css" rel="stylesheet" th:href="@{/css/grayscale.css}" />
    
    <link rel="stylesheet" href="../../../script/easyui/themes/icon.css" th:href="@{/script/easyui/themes/icon.css}" />
    <link rel="stylesheet" href="../../../script/easyui/themes/black/easyui.css" th:href="@{/script/easyui/themes/black/easyui.css}" />
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body id="page-top" data-spy="scroll" data-target=".navbar-fixed-top">

    <!-- Navigation -->
    <nav class="navbar navbar-custom navbar-fixed-top" role="navigation">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-collapse">
                    <i class="fa fa-bars"></i>
                </button>
                <a class="navbar-brand page-scroll" href="../index.html" th:href="@{/}">
                    <i class="fa fa-play-circle"></i>  <span class="light">Film</span> Renting
                </a>
            </div>

            <div class="collapse navbar-collapse navbar-right navbar-main-collapse"></div>
            <!-- /.navbar-collapse -->
        </div>
        <!-- /.container -->
    </nav>

    <!-- Intro Header -->
    <header class="intro">
        <div class="intro-body">
            <div class="container">
                <div class="row">
                    <div class="col-md-8 col-md-offset-2">
                        <form action="#" method="post" th:action="@{login}">
						    <table>
						      <tr>
						        <td></td>
						        <td sec:authorize="isAuthenticated()"><h4><input type="text" name="username" value="" th:value="${#authentication.principal.member.username}" placeholder="Username" class="form-control" /></h4></td>
						        <td sec:authorize="not isAuthenticated()"><h4><input type="text" name="username" placeholder="Username" class="form-control" /></h4></td>
						        <td></td>
						      </tr>
						      <tr>
						        <td></td>
						        <td><h4><input type="password" name="password" placeholder="password" class="form-control" /></h4></td>
						        <td></td>
						      </tr>
						      <tr>
						        <td><h4 sec:authorize="not isAuthenticated()">Remember me:<input type="checkbox" name="remember-me" /></h4></td>
						        <td><h4><input type="submit" value="Login" class="btn btn-lg btn-primary" /></h4></td>
						        <td><h4 th:text="${error}" class="error_msg"></h4></td>
						      </tr>
						      <tr sec:authorize="not isAuthenticated()">
						        <td><h5><a href="resetPwd.html" th:href="@{/goto_resetPassword}">Forgot password?</a></h5></td>
						        <td></td>
						        <td><h4><a href="register.html" th:href="@{/goto_register}" class="btn btn-default" >Register</a></h4></td>
						      </tr>
						    </table>
						</form>
                    </div>
                </div>
            </div>
        </div>
    </header>

    <!-- Map Section -->
    <div id="map"></div>

    <!-- jQuery -->
    <script src="../../../script/jquery-2.1.4.min.js" th:src="@{/script/jquery-2.1.4.min.js}"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="../../../script/bootstrap.min.js" th:src="@{/script/bootstrap.min.js}"></script>

    <!-- Plugin JavaScript -->
    <script src="../../../script/jquery.easing.min.js" th:src="@{/script/jquery.easing.min.js}"></script>

    <!-- Custom Theme JavaScript -->
    <script src="../../../script/grayscale.js" th:src="@{/script/grayscale.js}"></script>
</body>
</html>
